<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" href="__CSS__/main.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap.min.css" />
    <script type="text/javascript" src="__EXTEND__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/layer/2.4/layer.js"></script>
    <![endif]-->
    <title></title>
</head>
<body>
<div class="contant">
<div class="row">
    <div class="top">首页>gps设备位置</div>
    <div class="content applylist">
        <div class="box">
            <h1>gps设备位置</h1>
            <div id="allmap"></div>
            <!-- <div id="r-result">
                经度: <input id="longitude" type="text" style="width:100px; margin-right:10px;" />
                纬度: <input id="latitude" type="text" style="width:100px; margin-right:10px;" />
                <input type="button" value="查询" onclick="theLocation()" />
            </div> -->
        </div>
    </div>
</div>
</div>
<style type="text/css">
    body, html{width: 100%;height: 100%;margin:0;font-family:"微软雅黑";}
    #allmap{height:500px;width:100%;}
    #r-result{width:100%; font-size:14px;}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=72fefdae842ab9acff62d9669b659350"></script>

<script type="text/javascript">
    //GPS坐标
    var x = {$pInfo.blng};
    var y = {$pInfo.blat};
    var ggPoint = new BMap.Point(x,y);

    //地图初始化
    var bm = new BMap.Map("allmap");
    bm.centerAndZoom(ggPoint, 15);
    bm.addControl(new BMap.NavigationControl());

    //添加gps marker和label
    var markergg = new BMap.Marker(ggPoint);
    bm.addOverlay(markergg); //添加GPS marker
    var labelgg = new BMap.Label("{$pInfo.addr.Detail}<br>速度：{$pInfo.speed}<br>平台接收时间：{$pInfo.comtime}<br>设备号：{$pInfo.imei}",{offset:new BMap.Size(20,-10)});
    markergg.setLabel(labelgg); //添加GPS label


    // 百度地图API功能
    // var map = new BMap.Map("allmap");
    // map.centerAndZoom(new BMap.Point({$pInfo.BLng},{$pInfo.BLat}),11);
    // map.enableScrollWheelZoom(true);

    // // 用经纬度设置地图中心点
    // $(function(){
    //     map.clearOverlays();
    //     var new_point = new BMap.Point({$pInfo.BLng},{$pInfo.BLat});
    //     var marker = new BMap.Marker(new_point);  // 创建标注
    //     map.addOverlay(marker);              // 将标注添加到地图中
    //     map.panTo(new_point);
    // });

    // function theLocation(){
    //     if(document.getElementById("longitude").value != "" && document.getElementById("latitude").value != ""){

    //     }
    // }
</script>
</body>
